/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gbzwebscannerserviceclient2;

import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author handan
 */
public class GbzWebScannerServiceClient2 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here

        GbzServis_Service service = new GbzServis_Service();
        GbzServis gbzServis = service.getGbzServisPort();
        byte[] retValue = gbzServis.getData("10.0.1.110");
        System.out.println(retValue.length);

        try {
            BufferedImage bufferedImage = ImageIO.read(new ByteArrayInputStream(retValue));
            ImageIO.write(bufferedImage, "jpg", new File("C:\\Users\\handan\\Desktop\\image.jpg"));
        } catch (IOException ex) {
        }
    }
}
